<template>
  <component :is="LayoutComponents[currentLayout]" />
</template>
<script setup lang="ts">
import LayoutClassic from './LayoutClassic';
import LayoutVertical from './LayoutVertical';
import { computed, type Component } from 'vue';
import { LayoutType } from '@/stores/interface';
import { useGlobalStore } from '@/store/modules/global';

const layoutStore = useGlobalStore();
const currentLayout = computed(() => layoutStore.layout);
const LayoutComponents: Record<LayoutType, Component> = {
  vertical: LayoutClassic,
  classic: LayoutVertical,
};
</script>

<style lang="scss" scoped></style>
